package org.dev.app;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.hystrix.EnableHystrix;
import org.springframework.cloud.openfeign.EnableFeignClients;


// 开启OpenFeign功能
// Spring Cloud应用在启动时，OpenFeign会扫描标有@FeignClient注解的接口生成代理，并注入到Spring容器中
// OpenFeign集成Ribbon，内部也实现了客户端的负载均衡，其默认负载均衡测i略为轮询策略。
// eg: http://eureka8001.com:8088/consumer/dept/get/1
@SpringBootApplication
@EnableFeignClients // 开启OpenFeign功能
@EnableHystrix // 启动Hystrix
public class MicroServiceCloudConsumerDeptFeignApplication {

	public static void main(String[] args) {
		SpringApplication.run(MicroServiceCloudConsumerDeptFeignApplication.class, args);
	}

}
